package com.ykdl.member.kid.beans;

import java.io.Serializable;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;

import net.wxxr.http.interfaces.IJsonParser;

public class Nursing implements Serializable, IJsonParser {
	
	public static final int GROWTH_RECORD_TYPE_HEIGHT = 1; // 身高
	public static final int GROWTH_RECORD_TYPE_WEIGHT = 2; // 体重
	public static final int GROWTH_RECORD_TYPE_HEAD = 3; // 头围

	public static final int NURSING_RECORD_TYPE_NAPPY = 1; //换尿布
	public static final int NURSING_RECORD_TYPE_SLEEPING = 2; //睡眠
	public static final int NURSING_RECORD_TYPE_FEEDING = 3; //奶瓶
	public static final int NURSING_RECORD_TYPE_BREAST_FEEDING = 4; //母乳

	public static final int FEED_TYPE_FORMULA = 1; //配方奶
	public static final int FEED_TYPE_BREAST_FEED = 2; //母乳

	private static final long serialVersionUID = 1L;

	private long id;
	private long actor_id;
	private int nursing_type;
	private float create_time;
	
	public Nursing(){}
	
	public Nursing(long id, long actor_id, int nursing_type, float create_time) {
		super();
		this.id = id;
		this.actor_id = actor_id;
		this.nursing_type = nursing_type;
		this.create_time = create_time;
	}
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}
	public long getActor_id() {
		return actor_id;
	}
	public void setActor_id(long actor_id) {
		this.actor_id = actor_id;
	}
	public int getNursing_type(){
		return nursing_type;
	}
	public void setNursing_type(int nursing_type) {
		this.nursing_type = nursing_type;
	}
	public float getCreate_time() {
		return create_time;
	}
	public void setCreate_time(float create_time) {
		this.create_time = create_time;
	}
	@Override
	public IJsonParser parse(String json) throws Exception {
		if (json != null) {
			GsonBuilder b = new GsonBuilder();
			Gson g = b.create();
			return g.fromJson(json, Nursing.class);
		}
		return null;
	}
	
}
